package com.yes.yjj.jdbc;

import java.sql.DriverManager;

public class AppJdbc {
    public static void main(String[] args) throws Exception{
        //com.mysql.jdbc.Driver
        //加载类，并得到类对象
        //加载MySQL 的驱动类
        Class.forName("com.mysql.jdbc.Driver");
        //jdbc连接Mysql
        String url= "jdbc:mysql://localhost:3306/test";
        String username = "root";
        String password = "root";
        DriverManager.getConnection(url,username,password);
    }
}
